home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 038a / ds31.zip / DOORSORC.DOC next >
Text File  |  1990-11-04  |  65KB  |  1,647 lines

  1.  
  2.  
  3.  
  4.  
  5.                              ▓▒░ Door Source ░▒▓
  6.                              ▓▒░ Version 3.1 ░▒▓
  7.  
  8.  
  9.                               September 16, 1990
  10.  
  11.                                  Todd Miller
  12.                           Copyright 1988, 1989, 1990
  13.                               Computer City, USA
  14.  
  15.                      PC-Technologies BBS - Greensboro, NC
  16.                  Node 1 - (919) 299-7935 300/1200/2400/9600 USR
  17.                     Node 2 - (919) 294-1770 300/1200/2400
  18.  
  19.   
  20.    Door Source 3.1
  21.    Programmer's Manual
  22.  
  23.                                Table Of Contents
  24.  
  25.    Introduction  . . . . . . . . . . . . . . . . . . . . . . . 1
  26.  
  27.    Disclaimer  . . . . . . . . . . . . . . . . . . . . . . . . 2
  28.  
  29.    Using Door Source . . . . . . . . . . . . . . . . . . . . . 3
  30.  
  31.    Configuration File  . . . . . . . . . . . . . . . . . . . . 4
  32.  
  33.    Before you get started  . . . . . . . . . . . . . . . . . . 5
  34.  
  35.    Routines
  36.       AllTrun  . . . . . . . . . . . . . . . . . . . . . . . . 6
  37.       ANSIMusic  . . . . . . . . . . . . . . . . . . . . . . . 7
  38.       BackSpaceOver  . . . . . . . . . . . . . . . . . . . . . 8
  39.       BeepSpeaker  . . . . . . . . . . . . . . . . . . . . . . 9
  40.       Center . . . . . . . . . . . . . . . . . . . . . . . . . 10
  41.       ClrScrn  . . . . . . . . . . . . . . . . . . . . . . . . 11
  42.       ColorEasy  . . . . . . . . . . . . . . . . . . . . . . . 12
  43.       DoorBusy . . . . . . . . . . . . . . . . . . . . . . . . 13
  44.       ErrorLevelSet  . . . . . . . . . . . . . . . . . . . . . 14
  45.       ExitDoor . . . . . . . . . . . . . . . . . . . . . . . . 15
  46.       FileExist  . . . . . . . . . . . . . . . . . . . . . . . 16
  47.       GetTime  . . . . . . . . . . . . . . . . . . . . . . . . 17
  48.       HighScores . . . . . . . . . . . . . . . . . . . . . . . 18
  49.       Incomm . . . . . . . . . . . . . . . . . . . . . . . . . 19
  50.       MenuManager  . . . . . . . . . . . . . . . . . . . . . . 20
  51.       MoveCursor . . . . . . . . . . . . . . . . . . . . . . . 21
  52.       NL . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
  53.       Parser . . . . . . . . . . . . . . . . . . . . . . . . . 23
  54.       RandNum  . . . . . . . . . . . . . . . . . . . . . . . . 24
  55.       ReadUsers  . . . . . . . . . . . . . . . . . . . . . . . 25
  56.       Send . . . . . . . . . . . . . . . . . . . . . . . . . . 26
  57.       Sorter . . . . . . . . . . . . . . . . . . . . . . . . . 27
  58.       SysopPage  . . . . . . . . . . . . . . . . . . . . . . . 28
  59.       TimeConvert  . . . . . . . . . . . . . . . . . . . . . . 29
  60.       ViewFile . . . . . . . . . . . . . . . . . . . . . . . . 30
  61.       WaitASec . . . . . . . . . . . . . . . . . . . . . . . . 31
  62.       Windows  . . . . . . . . . . . . . . . . . . . . . . . . 32
  63.       WriteUsers . . . . . . . . . . . . . . . . . . . . . . . 33
  64.  
  65.  
  66.    Door Source 3.1
  67.    Programmer's Manual
  68.  
  69.                            Table Of Contents (Cont.)
  70.  
  71.    Script Commands . . . . . . . . . . . . . . . . . . . . . . 34
  72.  
  73.    Variables . . . . . . . . . . . . . . . . . . . . . . . . . 47
  74.  
  75.    Programming a Door with Door Source 3.1
  76.       Beginning your program . . . . . . . . . . . . . . . . . 49
  77.       Terminating your program . . . . . . . . . . . . . . . . 49
  78.       Loading QuickBasic 4.5 . . . . . . . . . . . . . . . . . 49
  79.       Compiling, Linking, and executing your Door  . . . . . . 50
  80.       Support of several bbs types . . . . . . . . . . . . . . 50
  81.  
  82.    Door Source Tips  . . . . . . . . . . . . . . . . . . . . . 51
  83.       ANSI Graphics and Color  . . . . . . . . . . . . . . . . 51
  84.       Paging the sysop . . . . . . . . . . . . . . . . . . . . 51
  85.       Some NEVERs  . . . . . . . . . . . . . . . . . . . . . . 52
  86.  
  87.    Door Source 3.1 in operation  . . . . . . . . . . . . . . . 53
  88.  
  89.    Door Source History and Credits . . . . . . . . . . . . . . 54
  90.  
  91.    Problems and Copyrights . . . . . . . . . . . . . . . . . . 55
  92.  
  93.    Door registration and license agreement forms . . . . . . . 56
  94.  
  95.    A look ahead in the next version  . . . . . . . . . . . . . 57
  96.  
  97.    Door Source 3.1     - Page 1
  98.    Programmer's Manual
  99.  
  100.       Introduction
  101.  
  102.            Door Source has always been designed with three things in mind.
  103.       Number one is easy of programming for you, cutting no corners, cutting
  104.       size of your programs, and your suggestions. Number two is space
  105.       optimization. Door Source tries to keep the space of your programs and
  106.       itself small to allow you to have even more room to program your doors!
  107.       Number three is the people who will use doors made with Door Source.
  108.       We try to keep any crude errors exploding on a user,which weren't
  109.       supposed to be there. We try to keep it looking clean, smooth, and
  110.       working fast. There is door writing utility for QuickBasic 3.1, it
  111.       covers most all of what you would do in a door. But we are taking it
  112.       a step farther, we are creating a new standard. Since QuickBasic 4.5
  113.       is becoming more widly wanting to be used, we let you use QuickBasic 4.5.
  114.       That's the ONLY version of the QuickBasic Editors that this will work
  115.       with. Of course it should work with anything above 4.5 too. Door Source
  116.       has some very hard to crack security codes at your disposal. Door Source
  117.       is open to you for your use. You do NOT need to pay US any money to
  118.       write a door with door source. Here are some of Door Source's new
  119.       features!
  120.  
  121.          *  Handles comm port by assembly interrupt routines.
  122.  
  123.          *  A routine to Trunacate all spaces on both ends.
  124.  
  125.          *  Two routines to check if there is a character waiting in the
  126.             communacations port or keyboard buffer.
  127.  
  128.          *  Three routines to give information on time and date.
  129.  
  130.          *  A sysop page routine.
  131.  
  132.          *  Four security routines to encode and decode a string.
  133.  
  134.          *  A viewfile routine to show ANSI and NON-ANSI files.
  135.  
  136.          *  A pop-up window and ANSI scroll bar routines!
  137.  
  138.          *  Support for bauds up to 52,600 bps!
  139.  
  140.          *  Properly credits chat time to caller's time left.
  141.  
  142.          *  Always checking for a loss of carrier.
  143.  
  144.          *  Supports PCBoard 14.x, PCBoard 11.x and 12.x!
  145.  
  146.          *  A formated printing routine to format large, ugly numbers!
  147.  
  148.          *  Handles networking and locking ports
  149.  
  150.    Door Source 3.1     - Page 2
  151.    Programmer's Manual
  152.  
  153.       Disclaimer
  154.  
  155.           We assume no liability for Door Source's use. You may copy it and
  156.       share it with others as long as the code and the documentation are
  157.       distributed together unmodified. You may include this logic in as many
  158.       door programs as you wish as long as you register each door with us
  159.       free of any charges and have a Door Source License. This entire
  160.       package is copyrighted and it is unlawful to disassemble or otherwise
  161.       decode or misuse the software contained herein. It is for your use in
  162.       programming doors and may not be altered in any way. You may not charge
  163.       a fee for its use or sell it. Door Source 3.1 is to be distributed in
  164.       it's ORIGINAL form and contain ALL of the original files unmodified.
  165.       We can not be held liable for any damages or losses of any type. It's
  166.       a violation of this disclaimer to distribute any doors without a
  167.       Door Source License, which is available at from us at no charge.
  168.  
  169.                Now that that part is over with, let's get on with it!
  170.  
  171.           If you ever have problems with Door Source, please contact me
  172.       via my bbs at 919 299-7935 and 919 294-1770. I want to help and
  173.       I want all of your good suggestions about Door Source.
  174.  
  175.    Door Source 3.1     - Page 3
  176.    Programmer's Manual
  177.  
  178.       Using Door Source
  179.  
  180.           One of the main advantages of Door Source is it's easy of use.
  181.       You can write a good looking professional door in just a couple of
  182.       hours. In order to use Door Source, you will be needing a copy of
  183.       QuickBasic 4.5, and you can use the already patched BRUN45.EXE that
  184.       we included in the zip. If you have door source set up in a different
  185.       directory than QuickBasic is, type this line before loading QuickBasic:
  186.  
  187.          SET LIB=(drive and path)
  188.  
  189.       This will tell QuickBasic where the Door Source libary is. You might
  190.       also want to have a copy of the PCBOARD.SYS in local mode handy. You
  191.       can get one of these by siging on locally and going to any one of
  192.       the doors you have already online. Then once it starts the batch file,
  193.       you should terminate it by using Ctrl-Break. Then simply copy the file
  194.       over to your QuickBasic directory and return to the bbs by typing
  195.       BOARD. Since DoorSource is a libary for QuickBasic 4.5, you can test
  196.       your program by running it right in QuickBasic instead of having to
  197.       go through the long compling process. This will be discussed in
  198.       Programming a door with Door Source 3.1, under the sub-title, Loading
  199.       QuickBasic 4.5.
  200.  
  201.       What should be in the zip you received is:
  202.         DOORSORC.DOC  -  Documentation that you are reading now.
  203.         DOORSORC.LIB  -  One form of the library that QuickBasic 4.5 needs.
  204.         DOORSORC.QLB  -  The other form that QuickBasic 4.5 needs.
  205.         DOORSORC.INT  -  A file to be included in your door.
  206.         README  .NOW  -  A readme file giving some extra credits.
  207.         MENUDEMO.BAS  -  A Demo of the Menu Manager routine
  208.         WINDDEMO.BAS  -  A Demo of the Window routine
  209.         EXAMPLE .CFG  -  An example of a door's configuration file.
  210.         LOADQB  .BAT  -  A quickloading batch file to make life easier.
  211.         BRUN45  .EXE  -  The patched BRUN module for QuickBasic 4.5.
  212.  
  213.         These two files are not included in this version.
  214.         DSQUICK .EXE  -  A TSR pop-up command reference for Door Source
  215.         DSQUICK .SLB  -  A file needed by DSQUICK. Keep in your QB
  216.                          directory or whereever you use DSQUICK
  217.  
  218.  
  219.    Door Source 3.1     - Page 4
  220.    Programmer's Manual
  221.  
  222.       Configuration File
  223.  
  224.           The configuration file's first four lines is setup up exactly like
  225.       most other doors. It should be:
  226.  
  227.          Full Drive\Path\and name of PCBOARD.SYS
  228.          BBS'S name
  229.          Sysop's First name
  230.          Sysop's Last name
  231.  
  232.       A example of this when filled out would be:
  233.  
  234.          C:\PCB\PCBOARD.SYS
  235.          PC-Technologies
  236.          Todd
  237.          Miller
  238.  
  239.       The file will be read into the computer in the included file. It
  240.       will be left open for you, so if you need any extra pramaters for
  241.       your program, you may add those on after the included file and
  242.       always besure to close it. It is always going to be file number one.
  243.  
  244.  
  245.    Door Source 3.1     - Page 5
  246.    Programmer's Manual
  247.  
  248.       Before You Start
  249.  
  250.  
  251.         A couple of things before you get programming. The library is written
  252.       with NO DEFINT A-Z commands in it. If you use a DEFINT A-Z or and DEFs
  253.       in your program, you must use the QB variable default (Single Precision)
  254.       when passing arguments to a Door Source routine. (Use the ! symbol)
  255.  
  256.         Make sure you read through the commands before you start, it will
  257.       help you jump into it faster.
  258.  
  259.       Routines
  260.  
  261.           All the routines that will be shown here follow a standard format.
  262.       It will contain the routine's name, variables, description, and an
  263.       example. Also check the Script Commands section of the manual for
  264.       9 additional sub routines.
  265.  
  266.    Door Source 3.1     - Page 6
  267.    Programmer's Manual
  268.  
  269.         Name : AllTrun
  270.  
  271.          CALL AllTrun(Text$)
  272.  
  273.         AllTrun is a routine to strip all leading and trailing spaces
  274.         off of the string to give it. The string passed is returned
  275.         with the updated striped string.
  276.  
  277.          Example:
  278.           Text$="    Some spaces    "
  279.           CALL AllTrun(Text$)
  280.  
  281.  
  282.    Door Source 3.1     - Page 7
  283.    Programmer's Manual
  284.  
  285.         Name : ANSIMusic
  286.  
  287.          CALL ANSIMusic(Music$, Music.On)
  288.  
  289.         ANSIMusic will send music to the remote user, if music is enabled.
  290.         It will also play the music to the local computer if the page bell
  291.         is on.
  292.  
  293.          Example:
  294.             (Ask user if they can support ANSI music)
  295.                 .
  296.                 .
  297.           Music$="ABCDABDEA"
  298.           CALL ANSIMusic(Music$, Music.On)
  299.  
  300.    Door Source 3.1     - Page 8
  301.    Programmer's Manual
  302.  
  303.         Name : BackSpaceOver
  304.  
  305.          CALL BackSpaceOver
  306.  
  307.         BackSpaceOver will start from the current position and back space
  308.         over all the characters back to column number 1. This will add
  309.         a nice clean up effect to any user (Ansi or non-ansi). It is used
  310.         in the Press Enter and More prompts in the program.
  311.  
  312.          Example:
  313.             (Print something out)
  314.                 .
  315.                 .
  316.           CALL BackSpaceOver
  317.  
  318.  
  319.    Door Source 3.1     - Page 9
  320.    Programmer's Manual
  321.  
  322.         Name : BeepSpeaker
  323.  
  324.          CALL BeepSpeaker
  325.  
  326.         BeepSpeaker will beep the remote speaker, and the local speaker too if
  327.         the page bell is on.
  328.  
  329.          Example:
  330.           CALL BeepSpeaker
  331.  
  332.    Door Source 3.1     - Page 10
  333.    Programmer's Manual
  334.  
  335.         Name : Center
  336.  
  337.          CALL Center(Text$)
  338.  
  339.         Center will set the TabSpace variable for Send, so when you call send
  340.         the string will be spaced the right amount to appear centered. It will
  341.         NOT print the string out, only set it up so Send will space it right.
  342.         This is done so you can modify the string (color or add more text)
  343.         however you want to.
  344.  
  345.          Example:
  346.           Text$="This string will be centered after Send has been called."
  347.           CALL Center(Text$)
  348.  
  349.  
  350.    Door Source 3.1     - Page 11
  351.    Programmer's Manual
  352.  
  353.         Name : ClrScrn
  354.  
  355.          CALL ClrScrn
  356.  
  357.         ClrScrn is the same as CLS, but will update the status bar, clear the
  358.         remote screen, and clear the local screen. DO NOT USE CLS EVER! The
  359.         use of CLS can cause unknown problems with the door.
  360.  
  361.          Example:
  362.           CALL ClrScrn
  363.  
  364.  
  365.    Door Source 3.1     - Page 12
  366.    Programmer's Manual
  367.  
  368.         Name : ColorEasy
  369.  
  370.          CALL ColorEasy(Text$, Foreground, Yes)
  371.  
  372.         ColorEasy will color a string colorfully and output it at the same
  373.         time. This routine is UNAFFECTED by TabSpace, so centering text
  374.         to be used with ColorEasy will NOT work. Different foreground
  375.         colors will produce different effects, experiment with it. The high-
  376.         intensity colors work and look better with this routine. The YES on
  377.         the end is telling the routine if you want it to send a enter after
  378.         it is done colorizing and printing the string. A NO will cause no
  379.         enter to be sent.
  380.  
  381.         NOTICE: This routine can be a *little* more sluggish than I would like
  382.                 it to be. I've done the best I can to speed it up, and am
  383.                 working on a faster version of it
  384.  
  385.          Example:
  386.           Text$="Colorize THIS string!! (All characters have a color!)"
  387.           CALL ColorEasy(Text$, 12, Yes)
  388.  
  389.    Door Source 3.1     - Page 13
  390.    Programmer's Manual
  391.  
  392.         Name : DoorBusy
  393.  
  394.          CALL DoorBusy
  395.  
  396.         DoorBusy is a routine that will check for a file existing in the
  397.         current directory, if it finds it, it will asume another node is
  398.         using the door, if not, it will create it so other nodes can't use
  399.         the door at the same time. This routine is useful if the door your
  400.         programming won't be able to support two people on at the same time.
  401.         The file will automatically be erased when you call ExitDoor. The
  402.         file that tells the door that another node is using the door is
  403.         stored in BUSYFILE$. This routine will automatically call ExitDoor
  404.         if the BUSYFILE$ is found.
  405.  
  406.          Example:
  407.           CALL DoorBusy
  408.  
  409.  
  410.    Door Source 3.1     - Page 14
  411.    Programmer's Manual
  412.  
  413.         Name : ErrorLevelSet
  414.  
  415.          CALL ErrorLevelSet(ErrorCode%)
  416.  
  417.         ErrorLevelSet will allow you to use the DOS ERRORLEVEL batch
  418.         sub-command. You can pass a number from 0 to 255 to this routine
  419.         at anytime in your program and it will set the errorlevel. This
  420.         routine will not call automatically call ExitDoor, you will have
  421.         to do that so we can provide more flexiablity. The number passed
  422.         to this routine *MUST* be in INTEGER form.
  423.  
  424.          Example:
  425.           CALL ErrorLevelSet(1)
  426.  
  427.  
  428.    Door Source 3.1     - Page 15
  429.    Programmer's Manual
  430.  
  431.         Name : ExitDoor
  432.  
  433.          CALL ExitDoor
  434.  
  435.         ExitDoor is a routine to wrap up all of the communacations handling,
  436.         hold the DTR and update the SYS file(s). Do NOT just END your program!
  437.         If you do, you will drop carrier on the user and the latest settings
  438.         (Page bell, Sysop on next, ect) will not be saved! If you wish to
  439.         drop carrier, and recycle the bbs, call ExitAndRecycle (Which is
  440.         not in this version but will be added next time).
  441.  
  442.          Example:
  443.           CALL ExitDoor
  444.  
  445.  
  446.    Door Source 3.1     - Page 16
  447.    Programmer's Manual
  448.  
  449.         Name : FileExist
  450.  
  451.          A = FileExist("COMMMAND.COM")
  452.  
  453.         FileExist a function that works exactly the same as the EXIST
  454.         script command, but this works as a function and returns
  455.         a numerical value instead of a letter, making it easier to use
  456.         this routine "on the fly". Simply pass it the name of the file
  457.         and it will return a non-zero value if it exist (TRUE) or a
  458.         one (1) if it doesn't exist (FALSE).
  459.  
  460.          Example:
  461.           IF FileExist("COMMAND.COM") THEN
  462.                CALL Send("Command.Com present",No,Yes,12)
  463.           ELSE
  464.                CALL Send("Command.Com not found",No,Yes,12)
  465.           END IF
  466.  
  467.  
  468.    Door Source 3.1     - Page 17
  469.    Programmer's Manual
  470.  
  471.         Name : GetTime
  472.  
  473.          CALL GetTime(Hours, Minutes, Seconds, SinceMidnight#)
  474.  
  475.         GetTime will provide you with the current Hour, Minute, and Second so
  476.         you won't have to chop up and convert TIME$ yourself. The Seconds
  477.         since midnight is also provided and is basically TIMER but with
  478.         everything after the decimal point cut off.
  479.  
  480.          Example:
  481.           CALL GetTime(Hours, Minutes, Seconds, SinceMidnight#)
  482.  
  483.  
  484.    Door Source 3.1     - Page 18
  485.    Programmer's Manual
  486.  
  487.         Name : HighScores
  488.  
  489.          CALL HighScores(Score.For.Player, HighScoreFile$)
  490.  
  491.         HighScores is a routine that will take the score for the current
  492.         user, update or add his/her score to a high score file, and finally
  493.         sort and print a high score listing. The listing will be centered,
  494.         and no header is printed so you can make your own.
  495.  
  496.          Example:
  497.           HighScoreFile$
  498.            (Calculate score for player on-line)
  499.              .
  500.              .
  501.            (Print a header)
  502.           CALL HighScores(Score.For.Player, HighScoreFile$)
  503.  
  504.  
  505.    Door Source 3.1     - Page 19
  506.    Programmer's Manual
  507.  
  508.         Name : Incomm
  509.  
  510.          CALL Incomm(Text$, No, No, 14)
  511.  
  512.         Incomm is a routine to output a line of text and then wait for a
  513.         response. Incomm is NOT affected by Tabspace, so anything printed
  514.         by it will NOT be tabed over (this will be added in a future version).
  515.         The first variable (Text$) is the line of text you want to print
  516.         as your prompt. The second variable allows you to send a enter BEFORE
  517.         inputing the response, and the third tells Incomm if you want to limit
  518.         the string, make it a hotkey, or have a unlimited input field. This
  519.         will be explained below. The last variable is the color for the prompt,
  520.         the text color is always a color 15 (High-intensity white). The input
  521.         is returned in the shared variable ARG$.
  522.  
  523.         Special Parameters:
  524.          Caps    You can specify at the begining of your program that you
  525.                  would like all input to be automatically converted to caps.
  526.                  Do this by making a line:  CAPS = Yes
  527.                  This will not be reset unless you do a CAPS = No.
  528.          Filter  This will filter out all graphics characters, so that a
  529.                  user can only input A-Z, a-z, and puncuation (!,.,*,ect.)
  530.  
  531.         Making a NORMAL input field
  532.          A normal input field is one where you can type as much as you want,
  533.          with no limits on the size of the line. Specify a NO or a 0 for the
  534.          third variable to do this.
  535.  
  536.         Making a LIMITED input field
  537.          A limited input field is one that will let you type as much as
  538.          you want, but will stop taking input WITHOUT doing a automatic
  539.          enter. This could be useful when you are using random access files
  540.          and dont want to cutoff what a user types in when you save it. To
  541.          do this, specify the size of the field in the third variable.
  542.  
  543.         Making a HOT KEY input field
  544.          A hot key input field is one that allows the user to type one
  545.          character and the program will automatically send a enter and
  546.          give you the character the user typed. Use Hot.Key in the third
  547.          field to do this.
  548.  
  549.          Example:
  550.           CALL Incomm("Enter your command:", No, No, 14)
  551.  
  552.    Door Source 3.1     - Page 20
  553.    Programmer's Manual
  554.  
  555.         Name : MenuManager
  556.  
  557.          CALL MenuManager(Menu$(), Yes, 10, 5, How.To.Select$, 15, Bar)
  558.  
  559.         MenuManager is a great way to present nice menus to ansi and non-ansi
  560.         users. Store the menu selections in an array and pass them in
  561.         the first parameter. The second parameter is if you wan the selections
  562.         to be centered automatically, and the third is the color for the
  563.         selections. The fourth is how many selections there are in the array,
  564.         and the fifth is a string telling the user how to select a selection.
  565.         The next to last one is the color for the "how to selcet" string and
  566.         the last one is a parameter that MenuManager passes back to you telling
  567.         you which selection the user selected. The way a user selects a item
  568.         on the menu is by pressing + or - to move a highlighting bar, or
  569.         they can press the number of the selection instead. Since the
  570.         highlighting bar requires ANSI graphics, the non-ansi user has to use
  571.         the other way by selecting the number of the selection. A good
  572.         "How to make a selection" string is something like this (so it covers
  573.         ansi and non-ansi people) :
  574.  
  575.          Use + and - to move bar and Enter to select or type the number
  576.  
  577.         You could also have a line in the program that would set up the string
  578.         at the begining after looking at the ANSI variable to tell if the
  579.         user was ansi or non-ansi so it would avoid all confusion.
  580.  
  581.           The example is in a program that comes with Door Source, the program
  582.           is MENUDEMO.BAS and will demonstrate the menus as long as you have
  583.           a config file and a PCBOARD.SYS file on hand.
  584.  
  585.         HOT TIP : Clear the screen before using menu manager using
  586.                   ClrScrn, just to make sure that both ends are in
  587.                   sync with locations on the screen and such.
  588.  
  589.    Door Source 3.1     - Page 21
  590.    Programmer's Manual
  591.  
  592.         Name : MoveCursor
  593.                ANSI ONLY ROUTINE
  594.  
  595.          CALL MoveCursor (14, 20)
  596.         
  597.         MoveCursor is just like the LOCATE command, but will use ansi commands
  598.         to set the cursor at a certain position. If your user is non-ansi, the
  599.         routine will sense that and will not do anything. Do NOT call LOCATE
  600.         ever in your door or you will cause problems with unknown ends. If you
  601.         need to locate a cursor for a non-ansi user, you will have to redraw
  602.         the screen, just like other door packages. In a future version, the
  603.         program will redraw for you. Notice, this is not built into the
  604.         Send routine, so the routine can offer more flexiablity.
  605.  
  606.          Example:
  607.           CALL MoveCursor (15, 10)
  608.  
  609.  
  610.    Door Source 3.1     - Page 22
  611.    Programmer's Manual
  612.  
  613.         Name : NL
  614.  
  615.          CALL NL(1)
  616.  
  617.         NL (stands for new line/lines) will send a enter or several enters.
  618.         The variable is how many enters you want to be sent.
  619.  
  620.          Example:
  621.           CALL NL(5)
  622.  
  623.  
  624.    Door Source 3.1     - Page 23
  625.    Programmer's Manual
  626.  
  627.         Name : Parser
  628.  
  629.          CALL Parser("*", Text$, ParArray$(), ErrCode)
  630.  
  631.         Parser will take Text$ and find every occurance of whatever the
  632.         first parameter is (in this case its a *). Then it will store what is
  633.         inbetween each * and store it in ParArray$. You can't have more than
  634.         50 things stored in the array and if you try to store more, it will
  635.         return with a 1 in ErrCode. It will also return with a 1 if the string
  636.         is no characters long. This could be useful to compact some data and
  637.         take it apart again all in one string. For example, you could store
  638.           Blue Cards = 10
  639.           Red Cards = 5
  640.           Yellow Cards = 25
  641.  
  642.             AS
  643.           "10*5*25*"
  644.  
  645.         You could see how useful it could be as long as you knew that blue
  646.         was first and yellow was last, and ect... But there is no routine YET
  647.         to poke something INTO a string like this, so that is up to you.
  648.  
  649.          Example:
  650.            (Read in a string from a file)
  651.              .
  652.              .
  653.           CALL Parser("/", Cards$, Array$(), ErrCode)
  654.            (Print out the data or use it)
  655.  
  656.  
  657.    Door Source 3.1     - Page 24
  658.    Programmer's Manual
  659.  
  660.         Name : RandNum
  661.  
  662.          A = RandNum(5, 10)
  663.  
  664.         RandNum is a FUNCTION that will generate a random number within
  665.         a specified range. The first variable is the lowest number desired
  666.         and the second variable is the highest number desired. This routine
  667.         will also randomize by the timer so it will give the most random
  668.         number it can give.
  669.  
  670.          Example:
  671.           A = RandNum(100,200)
  672.           B = RandNum(431,624)
  673.            .
  674.            .
  675.            (Print A + B)
  676.  
  677.    Door Source 3.1     - Page 25
  678.    Programmer's Manual
  679.  
  680.         Name : ReadUsers
  681.                PCBOARD 14.x ONLY
  682.  
  683.          CALL ReadUsers(ErrCode)
  684.  
  685.         ReadUsers will read from the users file (NOT USERS.INF for 14.5) and
  686.         return the data gotten from it. These variables are listed farther
  687.         down in the documentation. To write back to the file, use WriteUsers.
  688.         Please note that Door Source doesn't read automatically from the
  689.         users file, so that is why we included this routine.
  690.  
  691.         NOTE to all 14.5 users: It would be better to use ReadUserSYS and
  692.         WriteUserSYS since it a better meathod than using direct USERS file
  693.         access.
  694.  
  695.         NOTE: Make sure to set UserFile$ to the path/directory/name of
  696.               the user file. You could input this from the config file
  697.               as a 5th line from it, but Door Source will not read it
  698.               and set it for you.
  699.  
  700.          Example:
  701.           ' $INCLUDE:'DOORSORC.INT'
  702.           PROGNAME$="ABCD"
  703.           RELEASE$="1.0"
  704.           CALL ClrScrn
  705.           INPUT #1, UserFile$
  706.           CLOSE #1
  707.            .
  708.            .
  709.            .
  710.           CALL ReadUsers(ErrCode)
  711.  
  712.  
  713.  
  714.    Door Source 3.1     - Page 26
  715.    Programmer's Manual
  716.  
  717.         Name : Send
  718.  
  719.          CALL Send(Text$, No, Yes, 15)
  720.  
  721.         Finally, the way to print to the comm port and the screen. This routine
  722.         will handle everything you need to do. Do NOT EVER use PRINT in your
  723.         program, use this ALWAYS instead. The Text$ is a string to send out
  724.         and the second parameter is if you want it to beep the remote speaker
  725.         (and local if page bell is on). The third is if you want it to send
  726.         a enter after it's done printing. The last is the color for the text.
  727.  
  728.         To print BLINKING text:
  729.          You can print blinking text by setting BlinkText to Yes (or 1). Like
  730.          this : BlinkText = Yes
  731.          It will always be reset to No, after Send has done it's job, for you.
  732.  
  733.          Example:
  734.           CALL Send("Hello World!", Yes, Yes, 12)
  735.  
  736.  
  737.    Door Source 3.1     - Page 27
  738.    Programmer's Manual
  739.  
  740.         Name : Sorter
  741.  
  742.          CALL Send(SortArray$(), Number.To.Sort)
  743.  
  744.         Sorter will take the NUMBERS stored in the STRING array and order
  745.         them highest to lowest. You need to pass the array in as the first
  746.         parameter and how many elements there are to be sorted in the
  747.         second parameter.
  748.  
  749.          Example:
  750.            (Set up SortArray$)
  751.             .
  752.             .
  753.           SortArray$(1)="5":SortArray$(2)="3":SortArray$(3)="8"
  754.           CALL Sorter(SortArray$(), 3)
  755.  
  756.  
  757.    Door Source 3.1     - Page 28
  758.    Programmer's Manual
  759.  
  760.         Name : SysopPage
  761.  
  762.          CALL SysopPage
  763.  
  764.         SysopPage will page the sysop (only if the page bell is on) and allow
  765.         a PCBoard type of sysop chat with the user in your door.
  766.  
  767.         Special Parameters:
  768.          Not.Around$    A string that you can define (but it has a default)
  769.                         that will be shown to the user if the page bell is
  770.                         OFF.
  771.  
  772.          Example:
  773.           CALL SysopPage
  774.  
  775.  
  776.    Door Source 3.1     - Page 29
  777.    Programmer's Manual
  778.  
  779.         Name : TimeConvert
  780.  
  781.          CALL TimeConvert(Hours, Minutes, NewTime$)
  782.  
  783.         TimeConvert will take the Hours and Minutes, convert it to regular
  784.         time (non-military time) and return it to you in the third parameters.
  785.         Use GetTime to get the Hour and Minute easily seperated.
  786.  
  787.          Example:
  788.           CALL TimeConvert(Hours, Minutes, NewTime$)
  789.  
  790.    Door Source 3.1     - Page 30
  791.    Programmer's Manual
  792.  
  793.         Name : ViewFile
  794.  
  795.          CALL ViewFile("WELCOME", Yes, No, Yes)
  796.  
  797.         ViewFile will view a ansi or non-ansi file and show it to the local
  798.         and remote screens. The first parameter is the name and the second
  799.         is if you want ViewFile to check for a ANSI version of the file, and
  800.         if found and the user is in ansi mode, show them that version of the
  801.         screen (The ANSI versions need a G on the end). The third parameter
  802.         is if you want more prompts to automatically come up when 23 lines
  803.         have been printed. The last parameter is if you want a Press Any Key
  804.         to appear at the bottom of the screen once the file has finshed
  805.         displaying.
  806.  
  807.         Special Parameters:
  808.          You can set File.Missing$ to equal something other than the
  809.          default setting when a file is not found that you requested
  810.          to view.
  811.  
  812.          Example:
  813.           CALL ViewFile(FileName$, No, Yes, No)
  814.  
  815.  
  816.    Door Source 3.1     - Page 31
  817.    Programmer's Manual
  818.  
  819.         Name : WaitASec
  820.  
  821.          CALL WaitASec(5)
  822.  
  823.         WaitASec will wait the number of seconds specified before returning
  824.         control to your door. No input or carrier monitoring will be preformed
  825.         while this is running. It will simply pause for the time specified.
  826.         The speed of the machine will not make a difference on the time it
  827.         waits, this routine is based on the internal clock (Timer).
  828.  
  829.          Example:
  830.           CALL WaitASec(3)
  831.  
  832.  
  833.    Door Source 3.1     - Page 32
  834.    Programmer's Manual
  835.  
  836.         Name : Windows
  837.                NOT RECOMMENDED FOR NON-IBM USERS
  838.  
  839.          CALL Windows(1, 1, 10, 10, 12, 1, 14, 1, 1, Yes, Text$())
  840.  
  841.         First, Windows is a very slow machine, and shouldn't be used too
  842.         often. A fast version will appear soon...
  843.  
  844.         Windows will draw a window, with a shadow if specified, and display
  845.         text inside of it. This routine will work with Ansi and Non-ansi users,
  846.         but a non-IBM user would get wierd characters for the border. The first
  847.         parameter is the Upper Lefthand Row of the window and the second
  848.         is the Upper Lefthand Column of the window. The third is the lower
  849.         righthand row and the fourth is the lower righthand column for the
  850.         window. The fifth is the foreground color for the border and the sixth
  851.         is the background for the border. The seventh is the TEXT foreground
  852.         and the eigth is the TEXT background color. The ninth is the Border
  853.         type, the tenth is if you want a shadow, and the last is an array
  854.         that contains the text you want displayed in the window.
  855.  
  856.         Here is a way of writing it for quick reference:
  857.  
  858.         CALL Windows(ULR,ULC,LRR,LRC,FORE,BACK,TFORE,TBACK,BORDER,SHADOW,
  859.                      TEXT$())
  860.  
  861.         Borders:
  862.          Border type #1 : Is a single line border
  863.          Border type #2 : Is a double line border
  864.          Anything higher than 2 is the ASCII character that will be used
  865.          for the entire border. Like a 219 (A solid block) would be the
  866.          entire border.
  867.  
  868.          Example:
  869.           An example is in a program included with the Door Source ZIP. Its
  870.           name is WINDDEMO.BAS. Run this with a sample config and a sample
  871.           PCBOARD.SYS and look at it.
  872.  
  873.  
  874.    Door Source 3.1     - Page 33
  875.    Programmer's Manual
  876.  
  877.         Name : WriteUsers
  878.                FOR PCBOARD 14.x ONLY
  879.  
  880.          CALL WriteUsers(ErrCode)
  881.  
  882.         WriteUsers will take the same variables used by ReadUsers and
  883.         write them back out to the users file. You MUST keep the variable
  884.         types correct. A small mistake could corrupt this user's record!
  885.         If you are using PCBoard 14.5, use WriteUserSYS instead, for a
  886.         safer method.
  887.  
  888.         NOTE: Make sure to set UserFile$ to the path/directory/name of
  889.               the user file. You could input this from the config file
  890.               as a 5th line from it, but Door Source will not read it
  891.               and set it for you.
  892.  
  893.         WARNING: Always make sure you have a ReadUsers somewhere in
  894.                  your code before attempting to write again!
  895.  
  896.          Example:
  897.           ' $INCLUDE:'DOORSORC.INT'
  898.           PROGNAME$="ABCD"
  899.           RELEASE$="1.0"
  900.           CALL ClrScrn
  901.           INPUT #1, UserFile$
  902.           CLOSE #1
  903.            .
  904.            .
  905.           CALL ReadUsers(ErrCode)
  906.            .
  907.            .
  908.           CALL WriteUsers(ErrCode)
  909.  
  910.  
  911.    Door Source 3.1     - Page 34
  912.    Programmer's Manual
  913.  
  914.         Script Commands
  915.  
  916.          There is a routine that host several small routines in order to
  917.          provide handy dandy routines without using more bytes to make them
  918.          seperate calls. To call these routines set the shared variable
  919.          I1$ to the at least the first four letters of the script command
  920.          and call ScriptCMD.. Like this:
  921.  
  922.           I$="PRES"
  923.           CALL ScriptCmd
  924.  
  925.          The commands given by I1$ MUST be in ALL caps.
  926.          This would print a Press Any Key prompt and wait for a key to be
  927.          pressed before your program regains control.
  928.  
  929.          The following pages are a list of them and examples:
  930.  
  931.  
  932.    Door Source 3.1     - Page 35
  933.    Programmer's Manual
  934.  
  935.         Script Command : LTRIM
  936.  
  937.         Ltrim will trim off the leading spaces on the left of a string.
  938.         So if you had a string that was "     Hello", and ran that through
  939.         LTRIM, it would strip the spaces at the begining (not at the end, if
  940.         there are any) and it would look like "Hello".
  941.  
  942.         Pass the string to be trimed in I2$ and the new string will be
  943.         returned in O1$
  944.  
  945.  
  946.    Door Source 3.1     - Page 36
  947.    Programmer's Manual
  948.  
  949.         Script Command : RTRIM
  950.  
  951.         Rtrim will trim off the trailing spaces on the right of a string.
  952.         So you could take the string " Hello    " and Rtrim would return
  953.         in O1$ " Hello". Notice that the leading space at the begining
  954.         is NOT stripped off. This will only take from the right side of
  955.         a string.
  956.  
  957.          Example :
  958.           I1$="RTRIM":I2$="  Hello There World!   "
  959.           CALL ScriptCMD
  960.           CALL Send(O2$, No, Yes, 13)
  961.  
  962.         Pass the string to be trimed in I2$ and the new string will be
  963.         returned in O1$
  964.  
  965.  
  966.    Door Source 3.1     - Page 37
  967.    Programmer's Manual
  968.  
  969.         Script Command : UPPER
  970.  
  971.         Upper will convert the string in I1$ to all uppercase and return
  972.         it in O1$. If you had "Hello TheRe.", you would get back "HELLO THERE."
  973.  
  974.         Pass the string to be changed in I2$ and the new string will be
  975.         returned in O1$
  976.  
  977.    Door Source 3.1     - Page 38
  978.    Programmer's Manual
  979.  
  980.         Script Command : LOWER
  981.  
  982.         Lower will convert the string you give it to all lower case. Give
  983.         it "HEllo ThERE EverYOne!" it would give you "hello there everyone!".
  984.  
  985.          Example:
  986.           I1$="LOWER":I2$="hI ThEre EveRyOne!!"
  987.           CALL ScriptCMD
  988.           CALL Send(O2$, No, Yes, 11)
  989.  
  990.         Pass the string to be changed in I2$ and the new string will be
  991.         returned in O1$
  992.  
  993.  
  994.    Door Source 3.1     - Page 39
  995.    Programmer's Manual
  996.  
  997.         Script Command : MORE
  998.  
  999.         More will print a more prompt and present the user with three choices.
  1000.         O1$ will contain the choices and here is what it returns and what
  1001.         they mean:
  1002.  
  1003.           Y - See more of the file or what is on the screen
  1004.           N - Stop displaying what is on the screen
  1005.           C - Non-stop display mode
  1006.  
  1007.          Example:
  1008.            .
  1009.            .
  1010.           I1$="MORE"
  1011.           CALL ScriptCMD
  1012.           IF O1$="N" THEN GOTO ...
  1013.           IF O1$="Y" THEN GOTO ...
  1014.            .
  1015.            .
  1016.  
  1017.         More will return one of the three codes in O1$
  1018.  
  1019.  
  1020.    Door Source 3.1     - Page 40
  1021.    Programmer's Manual
  1022.  
  1023.         Script Command : PRESS
  1024.  
  1025.         Press will print a Press Any Key prompt and wait for the user to
  1026.         press a key.
  1027.  
  1028.         Press will need no variable passing.
  1029.  
  1030.  
  1031.    Door Source 3.1     - Page 41
  1032.    Programmer's Manual
  1033.  
  1034.         Script Command : EXIST
  1035.  
  1036.         Exist will check for the file name given in I2$ on the disk. If it
  1037.         finds the file it will return in O1$ a "Y" otherwise it will return
  1038.         a "N". It will find the first file that matches it in the current
  1039.         directory (unless you specify a directory).
  1040.  
  1041.          Example:
  1042.           I1$="EXIST":I2$="GAME.DAT"
  1043.           CALL ScriptCMD
  1044.           IF O1$="N" THEN ....
  1045.             .
  1046.             .
  1047.  
  1048.         Pass the filename to look for in I2$ and Exist will return a Y or N
  1049.         in O1$ depending on if it found it.
  1050.  
  1051.  
  1052.    Door Source 3.1     - Page 42
  1053.    Programmer's Manual
  1054.  
  1055.         Script Command : DAYOFTHEWEEK
  1056.  
  1057.         DayOfTheWeek will return in O1$ a number from 1 to 7 telling you
  1058.         what the day of the week is. 1=Sunday, 2=Monday,...,7=Saturday.
  1059.  
  1060.         DayOfTheWeek will return a NUMBER in the STRING O1$.
  1061.  
  1062.  
  1063.    Door Source 3.1     - Page 43
  1064.    Programmer's Manual
  1065.  
  1066.         Script Command : NAMECASE
  1067.  
  1068.         NameCase will convert a name to it's proper case. If you give it
  1069.         "DR. HOwaRD KAL Jr" it would give you "Dr. Howard Kal Jr".
  1070.  
  1071.          Example:
  1072.           I1$="NAME":I2$="MR. TOAD DE STOOL"
  1073.           CALL ScriptCMD
  1074.           CALL Send(O1$+" Correct?", No, Yes, 15)
  1075.  
  1076.         Pass the name to be converted in I2$ and NameCase will return
  1077.         the converted name in O1$
  1078.  
  1079.  
  1080.    Door Source 3.1     - Page 44
  1081.    Programmer's Manual
  1082.  
  1083.         Script Command : CODER1 and CODER2
  1084.  
  1085.         Coder1 is a routine to code and decode strings by using a password.
  1086.         Coder1 will NOT generate control codes or graphic characters. DO
  1087.         NOT use graphic characters in the password or results will be
  1088.         unpredictable!
  1089.  
  1090.         Coder2 is about the same as Coder1, BUT, it will generate graphic
  1091.         characters. This is better suited to random access files, since a
  1092.         EOF could pop up (In that case, use Coder1).
  1093.  
  1094.         On both of these routines, the longer the password, the better
  1095.         the protection. It will keep your data secure from casual attemps
  1096.         to break it, but a longer, more complex password will keep your
  1097.         data safer.
  1098.  
  1099.         To decode the coded strings, run them through the coder routine
  1100.         again, and the output will be the string, but de-coded.
  1101.  
  1102.          Example:
  1103.           Password$="#*&(JKJSF&^#^@"
  1104.           Text$="If you can read this after coding, you can't read!"
  1105.           I1$="CODER1":I2$=Text$:I3$=Password$
  1106.           CALL ScriptCMD
  1107.           Text$=O1$
  1108.            (Print it)
  1109.              .
  1110.              .
  1111.           I1$="CODER1":I2$=Text$:I3$=Password$
  1112.           CALL ScriptCMD
  1113.           Text$=O1$
  1114.            (Print it again, but now it is decoded)
  1115.  
  1116.    Door Source 3.1     - Page 45
  1117.    Programmer's Manual
  1118.  
  1119.         Script Command : ReverseBits
  1120.  
  1121.         ReverseBits is a more simple way to code something, but easy to crack.
  1122.         It will take each character in the string and reverse it's bits so
  1123.         it will be the opposite of what it used to be. To change it back,
  1124.         simply run it through the ReverseBits again and it will be normal.
  1125.  
  1126.          Example:
  1127.           Text$="This will go through simple coding"
  1128.           I1$="REVERSEBITS":I2$=Text$
  1129.           CALL ScriptCMD
  1130.           Text$=O1$
  1131.            (Code the string)
  1132.             .
  1133.             .
  1134.           I1$="REVERSEBITS":I2$=Text$
  1135.           CALL ScriptCMD
  1136.           Text$=O1$
  1137.            (Print it out decoded)
  1138.  
  1139.    Door Source 3.1     - Page 46
  1140.    Programmer's Manual
  1141.  
  1142.         Name : ReverseChars
  1143.  
  1144.         ReverseChars is a even simpliar routine to simply switch the characters
  1145.         around (The first is last and the last is first...). This could be
  1146.         used in conjunction with a Coder routine and Reversebits to make
  1147.         a good coded string. To decode it, run it through the routine again
  1148.         and the string will be normal again.
  1149.  
  1150.          Example:
  1151.           Text$="This will appear BACKWARDS!"
  1152.           I1$="REVERSECHARS":I2$=Text$
  1153.           CALL ScriptCMD
  1154.           Text$=O1$
  1155.            (Print it out)
  1156.  
  1157.    Door Source 3.1     - Page 47
  1158.    Programmer's Manual
  1159.  
  1160.       Variables
  1161.  
  1162.       Variables for your use and defination
  1163.  
  1164.       ARG$                      String containing input from INCOMM
  1165.       SYSDPATH$                 The FULL path\drive and name of PCBOARD.SYS
  1166.       BBSNAME$                  Name of the BBS running your door
  1167.       SYSOPNM$                  The sysop's full real name$
  1168.       SYSFIRST$                 The sysop's first name
  1169.       SYSLAST$                  The sysop's last name
  1170.       SYSOP                     1=Means the sysop is in the door
  1171.                                 0=Means a normal user is in the door
  1172.       CALLNAME$                 The caller's full name
  1173.       PROGNAME$                 The door's name
  1174.       RELEASE$                  Version number of your door
  1175.       USERF$                    User's first name
  1176.       USERL$                    User's last name
  1177.       I1$ and I2$               Input variables for script commands
  1178.       O1$ and O2$               Output variables for script commands
  1179.       YES                       Has a value of 1 which is used to mean YES
  1180.       NO                        Has a value of 0 which is used to mean NO
  1181.       Exit.Dor.1$ and           The lines to be outputed as the closing message
  1182.       Exit.Dor.2$               in the ExitDoor sub.
  1183.       Exit.Dor.Clr1 and         The color for the lines to be outputed in the
  1184.       Exit.Dor.Clr2             ExitDoor sub.
  1185.       Time.Left                 The amount of time left in minutes.
  1186.       PARARRAY$(50)             Parsing and sorting routine array.
  1187.     * Caps                      1=ALL input is to be cpnverted to UPPER CASE
  1188.                                 0=All input stays as is           (DEFAULT)
  1189.       No.Enter.Send             1=Makes INCOMM NOT send a enter AFTER
  1190.                                   input is completed
  1191.                                 0=Makes INCOMM sned a enter AFTER input
  1192.                                   has been completed.             (DEFAULT)
  1193.     * File.Missing$             This will be displayed which Viewfile can't
  1194.                                 find the file it is looking for. (Default is
  1195.                                 "File not found - Please report to sysop!")
  1196.       HotKey                    Has a vaule of -1 to make INCOMM have a hotkey
  1197.                                 affect for that input.
  1198.     * Not.Around$               This is displayed if the page bell is off and
  1199.                                 SysopPage is called.
  1200.       ANSI                      1=User is using ANSI graphics
  1201.                                 0=User is not using ANSI graphics
  1202.       BAUD                      1=Local mode, but otherwise it will equal the
  1203.                                 speed of the caller.
  1204.       COMMPORT$                 The comm port being using in COMx: format.
  1205.       PARAM$                    What Door Source received on the command line.
  1206.       BlinkText                 This will cause the next Send called to display
  1207.                                 the text in the color, but blinking when set
  1208.                                 to 1. This will be reset to zero after use.
  1209.       Tabspace                  This will cause the next Send called to space
  1210.                                 over to the right this many times. It will be
  1211.                                 reset to zero after it's use.
  1212.       Network                   1=Network is active
  1213.                                 0=No Network is active
  1214.       Node                      The node number of the node that is using
  1215.                                 your door
  1216.  
  1217.     * These variables are NOT reset to the default after they are used!
  1218.  
  1219.  
  1220.    Door Source 3.1     - Page 48
  1221.    Programmer's Manual
  1222.  
  1223.       Variables (Cont.)
  1224.  
  1225.       The following variables are what is returned and sent to ReadUsers and
  1226.       WriteUsers subroutines. All are self-explanatory.
  1227.  
  1228.       City.State$               Password$               Business.Phone$
  1229.       Voice.Phone$              Last.Date.On$           Last.Logon.Time$
  1230.       Expert.Mode$              Protocol.Type$          Last.Dir.Date$
  1231.       Security.Level$           Times.On$               Page.Length$
  1232.       Uploads$                  Downloads$              Daily.Download.Bytes$
  1233.       User.Comment$             Sysop.Comment$          Elasped.Time$
  1234.       Subcription.Reg$          Subcription.Expire$     Area.Last.In$
  1235.       Area.Reg$                 Expired.Area$           User.Msg.To.Scan$
  1236.       Total.Download.Bytes$     Total.Upload.Bytes$     Delete.Flag$
  1237.       Last.Read$(0-39)
  1238.  
  1239.     NOTE: The security levels are done by the ascii code. So it would be like
  1240.           65 = A     32 = (space)    0 = (null)
  1241.           You should use ASC(Security.Level$) to get the level number.
  1242.  
  1243.  
  1244.  
  1245.    Door Source 3.1     - Page 49
  1246.    Programmer's Manual
  1247.  
  1248.       Programming using Door Source 3.1
  1249.  
  1250.       Beginning your program
  1251.  
  1252.           The begining of your program should have these first four lines
  1253.       the same. This will start Door Source 3.1 in operation, and put
  1254.       the status line on the bottom of the screen. The four lines are:
  1255.  
  1256.          REM $INCLUDE: 'DOORSORC.INT'
  1257.          PROGNAME$ = "(your program's full name)"
  1258.          RELEASE$ = "(version number)"
  1259.          CALL ClrScrn
  1260.  
  1261.       Now, you should also remeber to close file number 1 right after the
  1262.       ClrScrn. If you do need to get your own information from the
  1263.       configuration file, then do all your inputing and close it.
  1264.       NOTE: Besure to read "Some NEVERs" before writing your door!
  1265.       Now you know some of the basics, but you should still read the
  1266.       rest of the Programmer's Manual.
  1267.  
  1268.       Temination of your door
  1269.  
  1270.           You should always end your door with the ExitDoor subroutine.
  1271.       It will handle all of the nessicary things. But you simply just
  1272.       need to call ExitDoor at the end of your program, like this:
  1273.  
  1274.           CALL ExitDoor
  1275.  
  1276.       Also refer to Routines, and find ExitDoor. If you want to change the
  1277.       color and make your own two line closing message, you will need to put
  1278.       the color for the first line in Exit.Dor.Clr1 and for the second in
  1279.       Exit.Dor.Clr2. The first line of the message should be in Exit.Dor.1$
  1280.       and the second should be put in Exit.Dor.2$.
  1281.  
  1282.       Loading Quick Basic 4.5
  1283.  
  1284.           You can load QuickBasic 4.5 from the command line, but using the
  1285.       batch file we have included, it will make it easier. Just type at
  1286.       the DOS prompt :
  1287.  
  1288.           LOADQB (door filename) (door configuration filename)
  1289.  
  1290.       This will call up QuickBasic 4.5 already to go, and will also allow
  1291.       you to run the door from the QuickBasic enviornment. You can also
  1292.       do it this way :
  1293.  
  1294.           QB (door filename) /L DOORSORC /CMD(door configuration filename)
  1295.  
  1296.  
  1297.    Door Source 3.1     - Page 50
  1298.    Programmer's Manual
  1299.  
  1300.       Compiling, Linking, and executing your door
  1301.  
  1302.           You can take advantage of QuickBasic 4.5 new features to the
  1303.       fullest by being able to run your door in the QuickBasic enviornment.
  1304.       To do this, make sure you have your testing configuration file setup
  1305.       and your copy of PCBOARD.SYS in the directory you want it to be. Now
  1306.       just run it by pressing F5!
  1307.  
  1308.           After you have tested it in the QuickBasic enviornment long
  1309.       enough, you can make the EXE version of your door very easily.
  1310.       Simply press ALT-R and select Make EXE from the menu. Now set
  1311.       the filename to what you want. Now you can choose to make your
  1312.       door a "stand-alone" or one that needs a BRUN45.EXE module. The
  1313.       difference between the two is that making it a stand-alone makes
  1314.       the code a little larger (by about 20K) but needs no patched
  1315.       BRUN45.EXE. If you compile the other way, your code will be
  1316.       smaller, but you will need the patched BRUN45.EXE.
  1317.  
  1318.       Support for several bbses
  1319.  
  1320.           One of Door Source's advantages over some of the other door
  1321.       writing utilities is that Door Source can support several versions
  1322.       of PCBoard! The versions of PCBoard are 11.8 and up, including support
  1323.       for 14.0 and up! The default bbs type is PCBoard 14.x. If you wish to
  1324.       change that, simply put this into your enviorment table by using the
  1325.       DOS command, SET.
  1326.  
  1327.            SET DORSRC=PCB14    -   Door Source will run PCBoard 14.x (DEFAULT)
  1328.            SET DORSRC=PCB121   -   Door Source will run PCBoard 11.8+ with COM1
  1329.            SET DORSRC=PCB122   -   Door Source will run PCBoard 11.8+ with COM2
  1330.  
  1331.       Another way to change the setting for the bbs type is on the command
  1332.       line, simply put PCB121 on the command line for PCBoard 11.8+ on
  1333.       COM1 and PCB122 on the command line for PCBoard 11.8+ on COM2, like
  1334.       this :
  1335.  
  1336.            MYDOOR MYDOOR.CFG PCB121
  1337.  
  1338.       You can't specify PCB14 on the command line, instead, Door Source
  1339.       will default to it.
  1340.  
  1341.  
  1342.    Door Source 3.1     - Page 51
  1343.    Programmer's Manual
  1344.  
  1345.       Door Source Tips
  1346.  
  1347.           Here are some basic tips and important information in order for
  1348.       you to program with Door Source 3.1! A couple just to remeber are:
  1349.  
  1350.          1. Save your door often!
  1351.          2. Before making the EXE version, make a backup of your QB code.
  1352.          3. Have a copy of a local mode PCBOARD.SYS on hand and have your
  1353.             testing configuration file locate it.
  1354.          4. Use a variety of ANSI Colors and Door Source routines to make
  1355.             your door appear more professional.
  1356.       
  1357.       ANSI Graphics and Color
  1358.  
  1359.           ANSI Graphics and Colors are made very easy to access in Door
  1360.       Source 2.0. We have added a second way to call them. You can use
  1361.       the normal BASIC numbers or you can use the word equalivent
  1362.  
  1363.           0  -  Black      8  -  Gray
  1364.           1  -  Blue       9  -  HiBlue
  1365.           2  -  Green     10  -  HiGreen
  1366.           3  -  Cyan      11  -  HiCyan
  1367.           4  -  Red       12  -  HiRed
  1368.           5  -  Magenta   13  -  HiMagenta
  1369.           6  -  Brown     14  -  Yellow
  1370.           7  -  White     15  -  HiWhite
  1371.  
  1372.       You can type either of these as your color. They all have the same
  1373.       realationship. Ansi Music can also be sent with the MusicG routine.
  1374.       You just need vaild notes in the string you give it. It works just
  1375.       like the BASIC PLAY command.
  1376.  
  1377.       Paging the Sysop
  1378.  
  1379.           Please ONLY page the sysop this way! You should use the SysopPage
  1380.       routine to make the paging sound like the PCBoard paging. If the
  1381.       sysop is NOT around, Door Source will output Not.Around$ to the user.
  1382.       You can change Not.Around$ from it's default if you wish. Knowing
  1383.       if the sysop is around or not matters on weather the page bell is on.
  1384.       Do NOT beep the computer or page the sysop in ANY other way!
  1385.  
  1386.  
  1387.    Door Source 3.1     - Page 52
  1388.    Programmer's Manual
  1389.  
  1390.       Some NEVERs
  1391.  
  1392.          Unfortunely, there are some NEVERS to Door Source, just like any
  1393.       thing else.
  1394.  
  1395.       1. You should NEVER use these BASIC keywords in doors that you write with
  1396.          Door Source 3.1:
  1397.          LOCATE         PRINT           VIEW PRINT      PRINT USING
  1398.          DRAW           END             INKEY$          KEY
  1399.          ON COM         OPTION BASE     PAINT           PEN
  1400.          PLAY           RUN             SCREEN          SHELL
  1401.          SOUND          STRIG           SYSTEM          WIDTH
  1402.          WINDOW         STICK           CLS
  1403.  
  1404.       2. Never use a invalid color number or try to faul up Door Source
  1405.          with invaild parameters.
  1406.  
  1407.       3. Never disassemble the library.
  1408.  
  1409.       Luckly, this covers most of them!
  1410.  
  1411.  
  1412.    Door Source 3.1     - Page 53
  1413.    Programmer's Manual
  1414.  
  1415.       Door Source 3.1 in Operation
  1416.  
  1417.           Door Source in Operation will have the status line on the
  1418.       bottom the screen on line 24 and line 25. It will show these things:
  1419.  
  1420.             1. The caller's baud rate
  1421.             2. The caller's name
  1422.             3. Time left in the door in minutes.
  1423.             4. The name of your door and release version number.
  1424.             5. Door Source 3.1
  1425.             6. The time the door was entered, current time and flags if any.
  1426.             7. Graphics mode (GR) or (NGR)
  1427.             8. Bell/Caller alarm toggle status
  1428.  
  1429.       The function keys open for the sysop to use are the following:
  1430.  
  1431.         (F4)    Page Bell Toggle
  1432.         (F7)    Caller Alarm Toggle
  1433.         (F8)    Return the user to the bbs
  1434.         (F10)   Start chat with user
  1435.         (ESC)   End chat with user
  1436.         (ALT-X) Exit to DOS after sign-off toggle
  1437.         (ALT-N) Sysop on next toggle
  1438.  
  1439.       Door Source will automatically take care of all of these behind the
  1440.       scenes, and elimnating the task of you having to look out for them.
  1441.  
  1442.  
  1443.    Door Source 3.1     - Page 54
  1444.    Programmer's Manual
  1445.  
  1446.       Door Source 3.1 History and Credits
  1447.  
  1448.           This history is taken from the previous doucmentations.
  1449.       The first public release is version 1.45.
  1450.  
  1451.  PRIVATE Version 1.0 - Beginning of Door Source
  1452.  
  1453.  PRIVATE Version 1.1 - Put in ANSI graphics routines and also fixed some
  1454.                        bugs with in communacation with comm ports.
  1455.  
  1456.  PRIVATE Version 1.2 - Started Script Commands and editing of the INCOMM
  1457.                        routine.
  1458.  
  1459.  PRIVATE Version 1.3 - Threw out ANSI graphics routines and rewrote it.
  1460.                        Completed script commands. Fixed major but tiny bugs.
  1461.  
  1462.  PRIVATE Version 1.4 - Threw out ANSI graphics routines again! Threw out
  1463.                        PCBOARD.SYS reading routines and put in ALT and
  1464.                        function key support. Added user base read/write
  1465.                        subroutines. Added save PCBOARD.SYS. Added Find First
  1466.                        routine. Added sorting and parsing routines.
  1467.  
  1468.  PUBLIC  Version 1.45- Fixed MAJOR read/write bug to the users file! Also
  1469.                        fixed MAJOR bug with Find First routine! PUBLIC
  1470.                        RELEASE number 1! Added BackSpaceOver sub and
  1471.                        fixed More and Press enter scripts to use BackSpaceOver
  1472.                        routine. Fixed a small chat bug.
  1473.  
  1474.  PUBLIC  Version 1.5 - Added Exit.Dor.Clr1 and Exit.Dor.Clr2 variables.
  1475.                        Fixed small bug with EXIST routines. Sped up INCOMM
  1476.                        slightly.
  1477.  
  1478.          Version 1.6 - Version 1.9 skipped because of drastic changes in 2.0
  1479.  
  1480.  PRIVATE Version 2.0B- Added viewfile, AllTrun, DayOfWeek, GetTime,
  1481.                        TimeConvert, ChkComm, ChkKeyboard, SysopPage,
  1482.                        Coder1, Coder2, ReverseBits, and ReverseChar
  1483.                        sub routines. Also added network detection and
  1484.                        multi-node support. BlinkText and Tabspace are
  1485.                        new Send variables. Added RandNum, MoveCursor,
  1486.                        Windows, HighScores, MenuManager, and FormatPrint
  1487.                        Also added support for PCBoard 11.8+.
  1488.  
  1489.  PUBLIC  Version 2.0 - Add BeepSpeaker and 14.5 support. Fixed minor
  1490.                        bugs and rewrote documentation
  1491.  
  1492.  PUBLIC  Version 2.2 - Added variable UserFile$ for I/O to user file.
  1493.                        Added abort for sysop page. Fixed a small bug in
  1494.                        MenuManager routine
  1495.  
  1496.  PUBLIC  Version 3.0 - Rewrote Window routine, fixed MoveCursor,
  1497.                        ClrScrn, and MenuManager bugs. Other minor
  1498.                        bugs fixed. Made all comm port handling done
  1499.                        by interrupts.
  1500.  
  1501.  PUBLIC  Version 3.1 - Added lock port handling and corrected locking
  1502.                        and unlocking of the user file
  1503.  
  1504.       Credits
  1505.  
  1506.       To Chuck Rouzer, who helped test from release 1.0 to 2.0!
  1507.  
  1508.       To William Pendergast, who helped to beta test 2.0 and has
  1509.       beta tested for me before.
  1510.  
  1511.       To John Richardson, that gave the ideas for the pop-up windows and
  1512.       scroll bar routines, and spotted some bugs I has over-looked in my
  1513.       own testing doors.
  1514.  
  1515.       To Mike Cleverly, who attempted to test door source, but some other
  1516.       program crashed his board and he has not reopened as far as I know.
  1517.  
  1518.       To David Basile, the first one to reply, and tested well to the last
  1519.       day. David also helped with suggestions on the documentation.
  1520.  
  1521.       To Premo Mondone, who helped test version 3.0 for bugs and high
  1522.       speed problems. Premo has also give many ideas for improvments
  1523.       upon Door Source
  1524.  
  1525.    Door Source 3.1     - Page 55
  1526.    Programmer's Manual
  1527.  
  1528.       Problems and Copyrights
  1529.  
  1530.           If you have any problems, feel free to write Computer City, USA
  1531.       at the address on the form on the next page, or call the bbs. I
  1532.       always would like to help solve any problems you might have, so
  1533.       please contact me somehow.
  1534.  
  1535.       Copyrights and Trademarks
  1536.  
  1537.       QuickBasic (R) is a registered trademark of Microsoft Corporation
  1538.  
  1539.       PCBoard (R) is a registered trademark of Clark Development Company (CDC)
  1540.  
  1541.       MS-DOS (R) is a registered trademakr of Microsoft Corporation
  1542.  
  1543.       BRUN45.EXE is copyrighted Microsoft Corporation, 1988
  1544.  
  1545.       Door Source is Copyrighted Computer City, USA 1988, 1989, 1990
  1546.  
  1547.  
  1548.       Send your registration card and license agreement to :
  1549.            Computer City, USA
  1550.            PO Box 77103
  1551.            Greensboro, NC  27417-7103
  1552.  
  1553.            ATTN: Door Source Registration
  1554.  
  1555.    Door Source         - Page 56
  1556.    Programmer's Manual
  1557.  
  1558.  
  1559.      Fill this form out for each door you write and mail it in. You can also
  1560.      call the bbs at (919) 299-7935 and fill out Scipt Questionnaire #3 which
  1561.      will ask the same questions as this form. For your first door you write
  1562.      using Door Source, you will need to fill the form out and sign the
  1563.      license aggrement. You should mail both of these in or call the
  1564.      bbs. Also, if you have any suggestions for Door Source, please send them
  1565.      along or leave me a comment on my bbs. ADDRESS ON PREVIOUS PAGE.
  1566.  
  1567.    ----------------------------------------------------------------------
  1568.    :  Door Source 3.1 - Door Registration Card                          :
  1569.    :                                                                    :
  1570.    :  Your full name: ________________________________________________  :
  1571.    :                                                                    :
  1572.    :  Street Adress : ________________________________________________  :
  1573.    :                                                                    :
  1574.    :  City, State, Zip : _____________________________________________  :
  1575.    :                                                                    :
  1576.    :  Phone number : _________________________________________________  :
  1577.    :                                                                    :
  1578.    :  Name of door(s) : ______________________________________________  :
  1579.    :                                                                    :
  1580.    :  Do you want this door listed in the listing of doors ?  YES  NO   :
  1581.    :                                                                    :
  1582.    :  What type of door is this : ____________________________________  :
  1583.    :                                                                    :
  1584.    :  Are your going to charge for your door :  NO  $______             :
  1585.    :                                                                    :
  1586.    :  If you have a Door Source License, what is your Seiral Number     :
  1587.    :                                                                    :
  1588.    :                                          S/N DS_______________     :
  1589.    :                                                                    :
  1590.    :  What version of Microsoft Quick Basic do you have : _________     :
  1591.    ----------------------------------------------------------------------
  1592.  
  1593.    -----------------------------------------------------------------------
  1594.    : License agreement:                                                  :
  1595.    :                                                                     :
  1596.    : This license will let you distruibe Door Source 1.45 and up in your :
  1597.    : door programs without having to give us any credit in any form. You :
  1598.    : will receive a seiral number, which you should keep on hand and     :
  1599.    : we reserve the right to have you reveal your seiral number at       :
  1600.    : any time, and we will keep a copy of all registrations on hand.     :
  1601.    : If you do not sign the license agreement and send it in, you will   :
  1602.    : not be allowed to distubute any doors using Door Source 1.45 and    :
  1603.    : above. By signing this agreement, you will also receive a free      :
  1604.    : membership to PC - Systems Door Programming Group. This license     :
  1605.    : will also allow you to charge for your doors containing Door Source :
  1606.    : 1.45 and above. Please include your address on a seperate sheet of  :
  1607.    : paper!                                                              :
  1608.    :                    Sign Here : X_________________________________   :
  1609.    -----------------------------------------------------------------------
  1610.  
  1611.  
  1612.  
  1613.    Door Source 3.1     - Page 57
  1614.    Programmer's Manual
  1615.  
  1616.       A look ahead
  1617.  
  1618.            I think that Door Source will quickly begin to be widely accepted
  1619.       by many door authors that program in the Quick Basic field and door
  1620.       authors who want more power, speed, and flexiablity than other door
  1621.       packages provide.
  1622.  
  1623.            Now if you had the 2.x documentation, you would see that
  1624.       these features are supposed to be implemented by 3.1, but this is
  1625.       3.1 simply because so much changed from 2.3 to this version. But
  1626.       we couldnt get it all in and have a release out to fix the bad
  1627.       compilation of 2.3, so look for these features in 4.0:
  1628.  
  1629.       *  Full support for DOOR.SYS and USERS.SYS in PCBoard 14.5
  1630.  
  1631.       *  Support for third party application fields in PCBoard 14.5
  1632.  
  1633.       *  Use of communacations ports 1, 2, 3, and 4
  1634.  
  1635.         And one or two of these (but not for sure):
  1636.  
  1637.       *  Xmodem, Ymodem, and ASCII transfer protocols built in
  1638.  
  1639.       *  A viewer for PAK, ARC, and ZIP files built in
  1640.  
  1641.       *  Routines to read/write to message files
  1642.  
  1643.  
  1644.      ▓▒░ End of Door Source 3.1 Documentation ░▒▓
  1645.  
  1646.  
  1647.